package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-06-02
 * Time: 21:00
 */
public class Book {
    private String name;
    private String author;
    private String type;
    private double price;
    private boolean state;

    @Override
    public String toString() {
        return "Book{" +
                "书名：'" + name + '\'' +
                "  作者：'" + author + '\'' +
                "  类型：'" + type + '\'' +
                "  价格：" + price +
                "  借阅状态：" + (state == true?"已被借阅":"未被借阅") +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public Book(String name, String author, String type, double price) {
        this.name = name;
        this.author = author;
        this.type = type;
        this.price = price;
    }
}
